package com.cmxh.shipper.mapper;

import com.cmxh.shipper.pojo.AddressBook;
import com.cmxh.shipper.pojo.Station;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author 32614
* @description 针对表【address_book(存储地址相关信息的表)】的数据库操作Mapper
* @createDate 2025-04-17 15:19:23
* @Entity com.cmxh.shipper.pojo.AddressBook
*/
public interface AddressBookMapper {

    int deleteByPrimaryKey(Long id);

    int insert(AddressBook record);

    int insertSelective(AddressBook record);

    AddressBook selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(AddressBook record);

    int updateByPrimaryKey(AddressBook record);

    List<AddressBook> selectAll(Integer uid);
    // 添加地址
    @Insert("insert into address_book(zanjduanid,uid) values(#{zanjduanid},#{uid})")
    int insertAddressBook(AddressBook addressBook);
    // 查询地址
    @Select("select * from address_book where zanjduanid=#{zanjduanid} and uid=#{uid}")
    AddressBook selectAddressBook01(Integer zanjduanid ,Integer uid);
    // 删除地址
    @Delete("delete  from address_book where id=#{id}")
    int deleteAddressBook(Integer id);


}
